/*
 * @LastEditTime: 2023-02-28 11:09:55
 */
import Koa from "koa";
// koa的请求体解析器
import koaBody from "koa-bodyparser";
import {router}  from "./app/router";

const app = new Koa();

// 将body解析器设置为中间件
app.use(koaBody());

app.use(router.routes()).use(router.allowedMethods());

app.use((ctx) => {
  ctx.body = "This Http Server";
});

app.listen(3005, () => {
  
  console.log("Server Runing http://localhost:3005");
});
